package day10.Ti.StreamDome;

import java.util.ArrayList;
import java.util.stream.Stream;

public class Ti03 {
    public static void main(String[] args) {
        ArrayList<String> list=new ArrayList<>();
        list.add("宋远桥");
        list.add("张翠山");
        list.add("周芷若");
        list.add("张无忌");
        list.add("赵敏");
        list.add("张松溪");
        list.add("宋青书");
        ArrayList<String> list2=new ArrayList<>();
        Stream<String> s1 = list.stream().filter(s -> s.startsWith("张"));
        Stream<String> s2 = list.stream().filter(s -> s.startsWith("宋"));
        Stream<String> concat = Stream.concat(s1, s2);
        concat.forEach(s -> System.out.println(s));


    }
}
